{% extends 'base.html' %}

{% block title %}首页{% endblock %}

{% block main %}
    {#    <h1>欢迎使用Data-co-pilot</h1>#}
    <div class="d-flex justify-content-center align-items-center">
        <a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none">
            <img src="{% static 'image/data-co-pilot.png' %}" alt="" height="150px">
        </a>
    </div>
    <div class="row row-cols-2 row-gap-4 d-flex justify-content-center align-items-center">
        <div class="d-flex justify-content-center align-items-center mt-5">
            <form class="col-12 col-lg-6 mb-3 mb-lg-0 me-lg-3" role="search" action="{% url 'appauth:gptapi' %}"
                  method="GET">
                <input type="search" name="q" class="form-control" placeholder="搜索..." aria-label="Search">
            </form>
        </div>
<!--        {% for blog in blogs %}-->
<!--            <div class="col">-->
<!--                <div class="card">-->
<!--                    <div class="card-header">-->
<!--                        <a href="{% url 'blog:blog_detail' blog_id=blog.id %}">{{ blog.title }}</a>-->
<!--                    </div>-->
<!--                    <div class="card-body" style="height: 100px;">-->
<!--                        <p class="card-text">{{ blog.content|striptags|truncatechars:200 }}</p>-->
<!--                    </div>-->
<!--                    <div class="card-footer text-body-secondary d-flex justify-content-between">-->
<!--                        <div>-->
<!--                            <img src="{% static 'image/avatar.webp' %}" class="rounded-circle" width="30" height="30"-->
<!--                                 alt="">-->
<!--                            {{ blog.author.username }}-->
<!--                        </div>-->
<!--                        <div>发布时间：{{ blog.pub_time|date:"Y年m月d日 h时i分" }}</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        {% endfor %}-->

    </div>
{% for item in q %}
        <div class="col">
            <br>
            <ul class="list-group">
                 <li class="list-group-item">{{item}}</li>
            </ul>
        </div>
        {% endfor %}
{% endblock %}